<template>
  <div>
    <div class="container">
      <div class="containera">
        <table border="0" cellspacing="0" cellpadding="0" >
          <tr>
            <td>
              <label for="">网站地址 : </label>
            </td>
            <td> <el-input placeholder="请输入网站地址" v-model="address" clearable>
              </el-input></td>
          </tr>
          <br />
          <br>
          <tr>
            <td>
              <label for="">网站名称 : </label>
            </td>
            <td><el-input placeholder="请输入网站名称" v-model="name" clearable>
              </el-input></td>
          </tr>
          <br />
          <br>
          <tr>
            <td>
              <label for="">轮播图 : </label>
            </td>
            <td>
              <el-upload
                action="https://jsonplaceholder.typicode.com/posts/"
                list-type="picture-card"
                :on-preview="handlePictureCardPreview"
                :on-remove="handleRemove"
              >
                <i class="el-icon-plus"></i>
              </el-upload>
              <el-dialog :visible.sync="dialogVisible">
                <img width="100%" :src="dialogImageUrl" alt="" />
              </el-dialog>
            </td>
          </tr>
          <br />
          <br>
          <tr>
            <td>
              <label for="">ICP : </label>
            </td>
            <td>
              <el-input placeholder="请输入ICP" v-model="ICP" clearable>
              </el-input>
            </td>
          </tr>
          <br />
          <br>
          <tr>
            <td>
              <label for="">公安备案号 : </label>
            </td>
            <td>
              <el-input
                placeholder="请输入公安备案号"
                v-model="input"
                clearable
              >
              </el-input>
            </td>
          </tr>
        </table>
      </div>
      <br>
      <br>
      <div style="margin-left:70%">
        <el-button type="primary" style="margin-left: 10rem">重 置</el-button>
        <el-button type="primary" @click="confirm">确 定</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //上传图片
      dialogImageUrl: "",
      dialogVisible: false,
      //网站地址
      address:'',
      //网站名称
      name:'',
      //ICP
      ICP: "",
      //公安备案号
      input: "",
    };
  },
  methods: {
    //上传图片
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
  },
};
</script>

<style>
.container {
  /* display: flex; */
  /* align-items: center; */
  /* justify-content: center; */
  height: 500rem;
}
.containera {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
 
}
</style>